package com.kudian.restful.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import java.sql.Timestamp;

/**
 * PayLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "pay_log")
public class PayLog implements java.io.Serializable {

	// Fields

	private Integer logId;
	private Integer orderId;
	private Double orderAmount;
	private Short orderType;
	private Short orderChannel;
	private String outTradeNo;
	private Short isPaid;
	private Timestamp addTime;

	// Constructors

	/** default constructor */
	public PayLog() {
	}

	/** full constructor */
	public PayLog(Integer orderId, Double orderAmount, Short orderType,
				  Short orderChannel, String outTradeNo, Short isPaid,
			Timestamp addTime) {
		this.orderId = orderId;
		this.orderAmount = orderAmount;
		this.orderType = orderType;
		this.orderChannel = orderChannel;
		this.outTradeNo = outTradeNo;
		this.isPaid = isPaid;
		this.addTime = addTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "log_id", unique = true, nullable = false)
	public Integer getLogId() {
		return this.logId;
	}

	public void setLogId(Integer logId) {
		this.logId = logId;
	}

	@Column(name = "order_id", nullable = false)
	public Integer getOrderId() {
		return this.orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	@Column(name = "order_amount", nullable = false, precision = 10)
	public Double getOrderAmount() {
		return this.orderAmount;
	}

	public void setOrderAmount(Double orderAmount) {
		this.orderAmount = orderAmount;
	}

	@Column(name = "order_type", nullable = false)
	public Short getOrderType() {
		return this.orderType;
	}

	public void setOrderType(Short orderType) {
		this.orderType = orderType;
	}

	@Column(name = "order_channel", nullable = false)
	public Short getOrderChannel() {
		return this.orderChannel;
	}

	public void setOrderChannel(Short orderChannel) {
		this.orderChannel = orderChannel;
	}

	@Column(name = "out_trade_no", nullable = false, length = 50)
	public String getOutTradeNo() {
		return this.outTradeNo;
	}

	public void setOutTradeNo(String outTradeNo) {
		this.outTradeNo = outTradeNo;
	}

	@Column(name = "is_paid", nullable = false)
	public Short getIsPaid() {
		return this.isPaid;
	}

	public void setIsPaid(Short isPaid) {
		this.isPaid = isPaid;
	}

	@Column(name = "add_time", nullable = false, length = 19)
	public Timestamp getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Timestamp addTime) {
		this.addTime = addTime;
	}

}